package com.informatics.polymer.client;

import com.smartgwt.client.widgets.tree.TreeNode;
/**
 * Tree record to store information about the polymer template to be clicked on to build
 * polymers.
 * @author ed
 * @version 1.0
 */
public class TreeRecord extends TreeNode {
	/**
	 * Polymer template to select.
	 */
	private String polymerTemplate;
	/**
	 * Template at the top of the hierarchy.
	 */
	private String rootValue;
	/**
	 * 
	 */
	private String extraId;
	/**
	 * Constructs Tree Record object.
	 * @param name - String value of  the polymer template.
	 * @param root - String value representing the parent.
	 */
	public TreeRecord(String name, String root,String id){
	//	this.polymerTemplate = name;
	//	this.rootValue = root;
	//	this.extraId = id;
		setAttribute("Polymer",name);
		setAttribute("rootVal",root);
		setAttribute("ExtraId",id);
	}
	/**
	 * 
	 * @return String representation of template.
	 */
	public String getTemplate(){
		return polymerTemplate;
	}
	/**
	 * 
	 * @return String representation of the root element.
	 */
	public String getRoot(){
		return rootValue;
	}
	/**
	 * 
	 * @return - String representation of extra id.
	 */
	public String getExtraId(){
		return extraId;
	}
	/**
	 * Sets polymer template.
	 * @param templateValue - polymer template.
	 */
	public void setTemplate(String templateValue){
		this.polymerTemplate = templateValue;
	}
	/**
	 * Sets root.
	 * @param root - parent node in the tree.
	 */
	public void setRoot(String root){
		this.rootValue = root;
	}
}
